package apt.action;

import java.util.List;

import apt.bean.ArtistBean;
import apt.dao.ArtistDao;

import com.opensymphony.xwork2.ActionSupport;

public class ArtistAction extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private ArtistBean artistBean;
	private ArtistDao artistDao;
	private List<ArtistBean> listArtist;
	
	public ArtistAction() {
		artistDao = new ArtistDao();
	}
	
	public String initData()
	{
		return SUCCESS;
	}
	
	public String getAllArtist()
	{
		
		try {
			listArtist = artistDao.getArtist();
		} catch (Exception e) {
			return ERROR;
		}
		return SUCCESS;
	}

	public ArtistBean getArtistBean() {
		return artistBean;
	}

	public void setArtistBean(ArtistBean artistBean) {
		this.artistBean = artistBean;
	}

	public ArtistDao getArtistDao() {
		return artistDao;
	}

	public void setArtistDao(ArtistDao artistDao) {
		this.artistDao = artistDao;
	}

	public List<ArtistBean> getListArtist() {
		return listArtist;
	}

	public void setListArtist(List<ArtistBean> listArtist) {
		this.listArtist = listArtist;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	
	
	

}
